package su.reg.learn;

import java.util.regex.Matcher;

public class ExpUtils {

    public static void showMatchGroup(Matcher matcher) {
        if (matcher.find()) {
            int i = matcher.groupCount();
            System.out.println("组数：" + i);
            for (int j = 0; j <= i; j++) {
                System.out.println("第"+j+"组");
                String group = matcher.group(j);
                System.out.println(group);
            }
        }
    }

}
